﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace VoiceTestPlatform
{
    /// <summary>
    /// Interaction logic for RecordWindow.xaml
    /// </summary>
    public partial class RecordWindow : Window
    {
        public RecordWindow()
        {
            InitializeComponent();
            //this.Loaded += new RoutedEventHandler(RecordWindow_Loaded);
            this.Loaded += RecordWindow_Loaded;
        }

        void RecordWindow_Loaded(object sender, RoutedEventArgs e)
        {
            ResultManager.RecordResults.Clear();
        }

        private void AddResutl_Click(object sender, RoutedEventArgs e)
        {
            ResultManager.RecordResults.Add(
                new TestResult()
                {
                    TestDate = DateTime.Now.ToString(),
                    Recognition = "我好，这是测试结果",
                    BackSound = "test.wav",
                    NoiseText = ParameterManager.ReNoiseText
                });
        }

        //void RecordWindow_Loaded(object sender, RoutedEventArgs e)
        //{
        //    var vm = new RecordViewModel();
        //    //vm.Load();
        //    this.DataContext = vm;
        //}
    }
}
